<?php
	####################################################
	# library import and object instance.              #
	####################################################
	include_once('common.php');


	####################################################
	# request data($_POST AND $_GET FROM $_REQUEST)    #
	####################################################
	# REQUEST(get and post variables)

	# GET(url variables)

	# POST(form variables)

	# Validation(special case validate)

	####################################################
	# implementation                                   #
	####################################################
?>
<?php
	$html->custom_header("template");
	$html->custom_js("{$JS}jquery.1.7.1.min.js");
	$html->custom_js("{$JS}lib.control.js");
	$html->custom_css("{$CSS}basic.ntdd.css");
	$html->custom_body();
?>
<?=$tmp->tiles_header()?>
	<?php
		$article = $db->gets(sprintf("SELECT * FROM `fruits`"));
		//$article = $db->gets(sprintf("SELECT fuid, name, name_eng, enable FROM `fruits`"), 'xmp');
		//$article = $db->get(sprintf("SELECT * FROM `fruits` WHERE `fuid`= '3'"), 'xmp');
		//$article = $db->get(sprintf("SELECT fuid, name, name_eng, enable FROM `fruits` WHERE `fuid`= '1'"), 'xmp');

		//$article = $db->getone(sprintf("SELECT name FROM `fruits` WHERE `fuid`= '1'"), 'xmp');

		if($article['has']){
			echo "has data";
		} else {
			echo "has not data";
		}

		$latest_query = $db->get_latest_query();
	?>
	<?=$tbltool->array_to_table($article['res'])?>
	<?=$latest_query?>
	<?php
		$array_a = array();
		$array_b = array();
		$array_c = array();
		for($i=0; $i<=10; $i++){
			$array_a['키'.$i] = '값'.$i;
		}
		$array_b = ArrayCopier::copy_array($array_a, $array_b);
		Nlog::xmp($array_b);
	?>
<?=$tmp->tiles_footer()?>
<?php $html->html_footer(); ?>